package com.gitee.deament.server.core.cli;

import com.gitee.deament.server.core.annotation.CliHander;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;

@CliHander(command="ECHO")
public class ECHOcli extends AbstractCli{

    @Override
    public void executeCli(ChannelHandlerContext channelHandlerContext, String command) {
       String result=   command.trim().split("ECHO")[1];
        channelHandlerContext.channel().writeAndFlush(new TextWebSocketFrame(result));
    }
}
